{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "e4731e5e",
   "metadata": {},
   "source": [
    "## Animating the Evolution of the Yield Curve with Matplotlib"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "fdebe3cb",
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "from IPython.display import display\n",
    "from matplotlib import animation\n",
    "from mpl_toolkits.mplot3d import Axes3D\n",
    "from openbb import obb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "03f31e84",
   "metadata": {},
   "outputs": [],
   "source": [
    "obb.user.preferences.output_type = \"dataframe\""
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9d713ccb",
   "metadata": {},
   "source": [
    "Define the maturities for the treasury rates"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "45a8d9ae",
   "metadata": {},
   "outputs": [],
   "source": [
    "maturities = [\"3m\", \"6m\", \"1y\", \"2y\", \"3y\", \"5y\", \"7y\", \"10y\", \"30y\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "be07e8ab",
   "metadata": {},
   "source": [
    "Fetch treasury rates data from the Federal Reserve, drop NaN values and unnecessary columns, and rename columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "e07d619f",
   "metadata": {},
   "outputs": [],
   "source": [
    "data = (\n",
    "    obb.fixedincome.government.treasury_rates(\n",
    "        start_date=\"1985-01-01\",\n",
    "        provider=\"federal_reserve\",\n",
    "    )\n",
    "    .dropna(how=\"all\")\n",
    "    .drop(columns=[\"month_1\", \"year_20\"])\n",
    ")\n",
    "data.columns = maturities"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "35ae91da",
   "metadata": {},
   "source": [
    "Add a column to indicate if the yield curve is inverted (30y < 3m)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "66d9e861",
   "metadata": {},
   "outputs": [],
   "source": [
    "data[\"inverted\"] = data[\"30y\"] < data[\"3m\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6640b6fd",
   "metadata": {},
   "source": [
    "Initialize figure"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "994f67df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGdCAYAAADuR1K7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy80BEi2AAAACXBIWXMAAA9hAAAPYQGoP6dpAAAf20lEQVR4nO3de3BU9f3/8deGkATFTcotayARbalEpNAGE8J0htbsGJSOpOKIGQSkGSkV0BpKAUUy2nbSilZQUMaZOgxVCoVaWpHi0GCVysoleOEWxnaUq5uAmA2iJDH5/P7wx9qVEMFvTpJ983zMnGE4+zm7n8+ZwD7ncHbxOeecAAAAjEjo6AkAAAC0JeIGAACYQtwAAABTiBsAAGAKcQMAAEwhbgAAgCnEDQAAMIW4AQAApiR29AQ6QnNzs44eParLLrtMPp+vo6cDAADOg3NOJ0+eVEZGhhISzn195qKMm6NHjyozM7OjpwEAAL6GQ4cOqV+/fud8/KKMm8suu0zS5yfH7/d38GwAAMD5qKurU2ZmZvR9/Fwuyrg5809Rfr+fuAEAIM581S0l3FAMAABMIW4AAIApxA0AADCFuAEAAKYQNwAAwBTiBgAAmELcAAAAU4gbAABgCnEDAABMIW4AAIApxA0AADCFuAEAAKYQNwAAwBTiBgAAmELcAAAAU4gbAABgCnEDAABMIW4AAIApxA0AADCFuAEAAKYQNwAAwBTiBgAAmELcAAAAU4gbAABgCnEDAABMIW4AAIApxA0AADCFuAEAAKYQNwAAwBTiBgAAmELcAAAAU4gbAABgCnEDAABMIW4AAIApxA0AADCFuAEAAKYQNwAAwBTiBgAAmELcAAAAU4gbAABgCnEDAABMIW4AAIApxA0AADClXeJmyZIl6t+/v1JSUpSXl6dt27a1On716tUaOHCgUlJSNHj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tP3vn4GLUVv/PH8ZceOcz7n/f7MEAACAAXxaCgAAmELcAAAAU4gbAABgCnEDAABMIW4AAIApxA0AADCFuAEAAKYQNwAAwBTiBgAAmELcAAAAU4gbAABgCnEDAABM+X9JnGEujayxKgAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure()\n",
    "ax = fig.add_subplot(1, 1, 1)\n",
    "(line,) = ax.plot([], [])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ba278cdd",
   "metadata": {},
   "source": [
    "Set the range of ticks"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "73291aad",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(0.0, 20.0)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ax.set_xlim(0, 8)  # Adjusted the range to accommodate all columns\n",
    "ax.set_ylim(0, 20)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2287bd06",
   "metadata": {},
   "source": [
    "Set the tick locations"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "96bd2940",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.axis.YTick at 0x31fa2bbe0>,\n",
       " <matplotlib.axis.YTick at 0x321f80040>,\n",
       " <matplotlib.axis.YTick at 0x321f424d0>,\n",
       " <matplotlib.axis.YTick at 0x321f41e10>,\n",
       " <matplotlib.axis.YTick at 0x321f43700>,\n",
       " <matplotlib.axis.YTick at 0x321f2c220>,\n",
       " <matplotlib.axis.YTick at 0x321f2ccd0>,\n",
       " <matplotlib.axis.YTick at 0x31fa2b520>,\n",
       " <matplotlib.axis.YTick at 0x321f2fee0>]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ax.set_xticks(range(9))\n",
    "ax.set_yticks([2, 4, 6, 8, 10, 12, 14, 16, 18])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8bb8406c",
   "metadata": {},
   "source": [
    "Set the axis labels"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "6199e398",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[Text(0, 2, '2'),\n",
       " Text(0, 4, '4'),\n",
       " Text(0, 6, '6'),\n",
       " Text(0, 8, '8'),\n",
       " Text(0, 10, '10'),\n",
       " Text(0, 12, '12'),\n",
       " Text(0, 14, '14'),\n",
       " Text(0, 16, '16'),\n",
       " Text(0, 18, '18')]"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ax.set_xticklabels(maturities)\n",
    "ax.set_yticklabels([2, 4, 6, 8, 10, 12, 14, 16, 18])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "209da1e1",
   "metadata": {},
   "source": [
    "Force the y-axis labels to the left"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "1e9d3065",
   "metadata": {},
   "outputs": [],
   "source": [
    "ax.yaxis.set_label_position(\"left\")\n",
    "ax.yaxis.tick_left()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ddc5b0b7",
   "metadata": {},
   "source": [
    "Add the axis labels"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "86dfa280",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0.5, 1.0, 'U.S. Treasury Bond Yield Curve')"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkIAAAHHCAYAAABTMjf2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy80BEi2AAAACXBIWXMAAA9hAAAPYQGoP6dpAAA8l0lEQVR4nO3de1wVdf7H8TegHLxx8YaKBKXl/RYmoRlaJGWZVqukhcim5iU3Y9vSNMm0NFPT9bpZi25rqbXalppGpFsa5RW1EjVvuP4ExRJUVAS+vz98cLYToGDAEeb1fDzO4+F8z3dmPnMGPG9mvjPjYowxAgAAsCBXZxcAAADgLAQhAABgWQQhAABgWQQhAABgWQQhAABgWQQhAABgWQQhAABgWQQhAABgWQQhAABgWQQhACihI0eOyMXFRYsXLy6V5XXr1k3dunW7rnkDAwM1aNCga/ZbvHixXFxcdOTIketaD1BZEYRQKb3yyitycXFRenp6oe+3bt26WF882dnZmj17tjp06CBPT095e3urVatWGjp0qJKTk6+rpmu9rvcLsbL67edTo0YNtWzZUpMnT1ZWVpazyyvSsGHD5O7uru+//77Aezk5OWrbtq0CAwN1/vx5J1R3bUlJSXryySfl7+8vm82m2rVrKywsTHFxccrNzXV2eUCpqeLsAoAb2WOPPabPPvtM/fv315AhQ3T58mUlJydr9erV6ty5s5o3b17sZT366KNq2rSpffrcuXMaPny4HnnkET366KP2dl9f31Ldhsrgvvvu08CBAyVd+dy+/vprvfzyy9q1a5c+/PBDJ1dXuKlTp+rf//63hg0bpq+//louLi7299566y3t2bNHa9asUY0aNfT55587sdKC3nnnHQ0bNky+vr6KjIzUrbfeqrNnzyohIUFPPfWUTpw4oZdeesnZZQKlgiAEFGHr1q1avXq1XnvttQL/6c+dO1dnzpwp0fLatm2rtm3b2qfT09M1fPhwtW3bVk8++WSR8128eFHu7u5yda1YB3BzcnKUl5cnd3f3372s2267zeEzGjZsmLKzs7Vy5UpdvHhRHh4ev3sdpc3b21uzZ89WRESEFi1apKFDh0qSUlJSNHHiRPXr1089e/aUpFL5jErLt99+q2HDhikkJERr165VrVq17O+NHj1a27ZtK/Qo1/U4f/68atSoUSrLAq5XxfqfFShHBw8elCR16dKlwHtubm6qU6dOqa9z48aNcnFx0bJlyzR+/Hj5+fmpevXqyszMlCR99913uv/+++Xl5aXq1asrNDRUmzdvdljG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Wda0vI0my2WwaN26cxo0bpxMnTug///mPZs+erRUrVqhq1ar65z//WSa13XzzzQ7T+WHlaqdkMjIy5OPjowsXLmjKlCmKi4vT8ePH7UEhv0++V199Vb1799Ztt92m1q1b6/7771dkZKTDgO7fW7ckubq66oknntCCBQuUlZWl6tWra+nSpfLw8HA4FXI1jRs3VlhYmH364YcfVp06dfT8889r9erV6tWrl44ePSpJatasWYH5mzdvrk2bNjm0eXh4FAhtPj4++uWXX+zTR48eVcOGDVWzZk2HfoWt42rc3NzUoUMHHTx4UK1atbpm/wMHDmjv3r0F6suXP96oMEePHlVwcHCB9uLU7OnpKUk6e/bsNftejypVqqhx48YF2iMiIjRr1ix98sknGjBggM6dO6e1a9fq6aeftv+e5v8O5IfBomoHSooghEop/4jAhQsXCn0/KyurxFcaNWzYUI8//rgee+wxtWrVSitWrNDixYvLZOzQb8dz5B/tefPNN9W+fftC58n/sh41apTi4uI0evRohYSEyMvLSy4uLnr88ccdBszefffdOnjwoP7973/r888/1zvvvKO33npLCxcu1ODBgyVdCYu/DlL5irqPTFHjUAYOHKg333xTH3/8sfr376/3339fDz30kLy8vK7+QVzFvffeK0n66quv1KtXrxLP/+vxSjeavLw8tWnTRjNnziz0fX9//zJZb9OmTVWlShXt2bOnWP2L+mOiqJ8Pm81W6NWPd955pwIDA7VixQoNGDBAn376qS5cuKCIiAh7n/yf3ffee6/Q8VXlOYYPlQs/OaiU8gc679u3r8CXRlZWlo4dO6YePXpc17KrVq2qtm3b6sCBA0pPT7/qoNfS0qRJE0lX/ur99ZGRwnz00UeKiorSjBkz7G0XL14s9FRe7dq1FR0drejoaJ07d0533323XnnlFXsQ8vHxcThVlC//6EtxtW7dWh06dNDSpUvVuHFjpaSkaM6cOSVaxm/l5ORIkv10yq/3+W+PGuzbt8/+fkkEBAQoISFB586dczgqtG/fvustu1iaNGmiXbt26d577y3WkctfCwgIKPR0Z3Fqrl69uu655x59+eWXOnbs2DUDl4+PjyQV+Nkq6c+HdOUKu9mzZyszM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xUlSrF+y/G3d1dubm5Dm0tWrRQTk6OvvvuO3Xu3FmSdPr0ae3bt08tW7Ys1Zo3b96sQYMG6ZFHHpF0JcwdOXLkmjXWq1dPqampMsbYw1VSUtJ11VC1atUCy5ekwYMHq3Xr1po/f75ycnL06KOPXtfyARSOU2MAStXIkSP1888/q3///tq6dasOHjyo9evXKzo6utAveunKVVPnzp1TQkKC0tPTlZWVpVtvvVW9e/fWkCFDtGnTJu3atUtPPvmk/Pz81Lt371Kt+dZbb9XKlSuVlJSkXbt2acCAAQWuygoMDNRXX32l48eP26+A69atm06dOqVp06bp4MGDmjdvXoEr6IorMDBQCQkJSk1N1S+//GJvb9Gihe688069+OKL6t+/v6pVq3b9GwqgAIIQgFLVqFEjbd68Wbm5uerRo4fatGmj0aNHy9vbu8grnTp37qxhw4YpIiJC9erV07Rp0yRduUIqKChIDz30kEJCQmSM0dq1awucrvu9Zs6cKR8fH3Xu3Fm9evVSeHi4br/9doc+r776qo4cOaImTZrY7wHUokULzZ8/X/PmzVO7du20ZcsW+xVvJTVjxgzFx8fL399fHTp0cHjvqaeeUnZ2tv74xz9e3wYCKJKL+e0JbgDADWXSpEn68MMPtXv3bmeXAlQ6HBECgBvUuXPn9P3332vu3LkaNWqUs8sBKiWCEADcoJ555hkFBQWpW7dunBYDyginxgAAgGVxRAgAAFgWQQgAAFgWQQgAAFgWQQgAAFgWQQgAAFgWQQgAAFgWQQgAAFgWQQgAAFgWQQgAAFjW/wO0Y4zkF/bKPQAAAABJRU5ErkJggg==",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.ylabel(\"Yield (%)\")\n",
    "plt.xlabel(\"Time to maturity\")\n",
    "plt.title(\"U.S. Treasury Bond Yield Curve\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a2efb4de",
   "metadata": {
    "lines_to_next_cell": 2
   },
   "source": [
    "Initialization function for the animation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "a4a23543",
   "metadata": {
    "lines_to_next_cell": 2
   },
   "outputs": [],
   "source": [
    "def init_func():\n",
    "    line.set_data([], [])\n",
    "    return (line,)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "24e87c6d",
   "metadata": {
    "lines_to_next_cell": 2
   },
   "source": [
    "Animation function to update the plot for each frame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "18a5ad3c",
   "metadata": {},
   "outputs": [],
   "source": [
    "def animate(i):\n",
    "    x = range(0, len(maturities))\n",
    "    y = data[maturities].iloc[i]\n",
    "    dt_ = data.index[i].strftime(\"%Y-%m-%d\")\n",
    "\n",
    "    if data.inverted.iloc[i]:\n",
    "        line.set_color(\"r\")\n",
    "    else:\n",
    "        line.set_color(\"y\")\n",
    "\n",
    "    line.set_data(x, y)\n",
    "\n",
    "    plt.title(f\"U.S. Treasury Bond Yield Curve ({dt_})\")\n",
    "    return (line,)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "30f8cc19",
   "metadata": {},
   "source": [
    "Create the animation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "a2784bd1",
   "metadata": {},
   "outputs": [],
   "source": [
    "ani = animation.FuncAnimation(\n",
    "    fig, animate, init_func=init_func, frames=len(data.index), interval=250, blit=True\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "828a51e4",
   "metadata": {},
   "source": [
    "Display the plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "5c605ec3",
   "metadata": {},
   "outputs": [],
   "source": [
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "154f16f1",
   "metadata": {},
   "source": [
    "**Jason Strimpel** is the founder of <a href='https://pyquantnews.com/'>PyQuant News</a> and co-founder of <a href='https://www.tradeblotter.io/'>Trade Blotter</a>. His career in algorithmic trading spans 20+ years. He previously traded for a Chicago-based hedge fund, was a risk manager at JPMorgan, and managed production risk technology for an energy derivatives trading firm in London. In Singapore, he served as APAC CIO for an agricultural trading firm and built the data science team for a global metals trading firm. Jason holds degrees in Finance and Economics and a Master's in Quantitative Finance from the Illinois Institute of Technology. His career spans America, Europe, and Asia. He shares his expertise through the <a href='https://pyquantnews.com/subscribe-to-the-pyquant-newsletter/'>PyQuant Newsletter</a>, social media, and has taught over 1,000+ algorithmic trading with Python in his popular course **<a href='https://gettingstartedwithpythonforquantfinance.com/'>Getting Started With Python for Quant Finance</a>**. All code is for educational purposes only. Nothing provided here is financial advise. Use at your own risk."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a2c371c9-cbe0-4987-b17b-81e5c008d531",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "jupytext": {
   "cell_metadata_filter": "-all",
   "main_language": "python",
   "notebook_metadata_filter": "-all"
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
